/*
 * Copyright 2012 Victor.
 */
package lab1.lib.db;

import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.Locale;

/**
 * Load database connection.
 * @author Victor
 */
public class DataBase
{
    public static java.sql.Connection getConnection() throws SQLException, ClassNotFoundException
    {
        Class.forName("oracle.jdbc.driver.OracleDriver");
        java.sql.Connection conn;
        Locale.setDefault(Locale.ENGLISH);
        conn = DriverManager.getConnection(
                "jdbc:oracle:thin:@apache:1521:XE",
                "system", "oracle");
        //for debug
        conn = new net.sf.log4jdbc.ConnectionSpy(conn);
        return conn;
    }
}
